//
//  BWDetailViewController.swift
//  weibo
//
//  Created by libowen on 16/5/20.
//  Copyright © 2016年 libowen. All rights reserved.
//

import Foundation
import UIKit

class BWDetailViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        //设置背景色
        view.backgroundColor = UIColor.whiteColor()
//        let back = UIBarButtonItem(imageName: "navigationbar_back_withtext", title: "返回", target: self, action: "back")
//        //设置自定义返回按钮
//
//        self.navigationItem.leftBarButtonItem = back
        self.title = "\(navigationController?.childViewControllers.count ?? 0)"
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Next", style: .Plain, target: self, action: "next")
    }
//    @objc private func back() {
//        navigationController?.popViewControllerAnimated(true)
//    }
    @objc private func next() {
        let next = BWDetailViewController()
        navigationController?.pushViewController(next, animated: true)
    }
}























